package com.bdqn.ch01.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    @RequestMapping(value = "/hello")
    @ResponseBody
    public String hello(@RequestParam(value = "name", required = false) String name) {
        System.out.println("name姓名:" + name);
        return "hello," + name;
    }

}
